import 'package:animal/constant/color.dart';
import 'package:animal/constant/font.dart';
import 'package:animal/ui/mine/controller/VendorsServiceController.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:animal/widgets/appbar_widget.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getwidget/getwidget.dart';

///我的——商家服务
class VendorsServicePage extends StatelessWidget {
  VendorsServicePage({Key? key}) : super(key: key);
  late VendorsServiceController controller;
  @override
  Widget build(BuildContext context) {
    controller = Get.put(VendorsServiceController());
    return Scaffold(
      backgroundColor: KColorConstant.appBgColor,
      appBar: AppBarWidget.defaultAppBar(title: Text("商家服务", style: KFontConstant.myTextStyle(size: 20, bold: true)), backgroundColor: Colors.white, actions: [
        GFButton(onPressed: () {}, text: "店铺信息", textStyle: KFontConstant.myTextStyle(size: 17, color: Colors.blue), type: GFButtonType.transparent)
      ]),
      body: Stack(
        alignment: Alignment.bottomCenter,
        children: [
          const Center(child: Text("推广内容说明")),
          Container(
              padding: EdgeInsets.only(left: ScreenUtil().L(20), right: ScreenUtil().L(20), top: ScreenUtil().L(10), bottom: ScreenUtil().L(13)),
              height: ScreenUtil().L(85),
              decoration: BoxDecoration(
                color: Colors.white,
                border: Border(top: BorderSide(width: ScreenUtil().L(1),color: Colors.black))
              ),
              child: Column(
                children: [
                  Text("您的商家服务于2020-10-15日到期", style: KFontConstant.myTextStyle(size: 15)),
                  GFButton(
                      onPressed: ()=>controller.openService(),
                      text: "开通服务",
                      textStyle: KFontConstant.myTextStyle(size: 17, color: Colors.white),
                      fullWidthButton: true,
                      size: ScreenUtil().L(40)),
                ],
              ))
        ],
      ),
    );
  }
}
